package com.twohalf.mifty.server;

import club.jmint.mifty.server.MiftyServer;
import com.twohalf.mifty.service.DemoServiceImpl;
import com.twohalf.mifty.service.FeedbackServiceImpl;
import com.twohalf.mifty.service.OrderServiceImpl;
import com.twohalf.mifty.service.PaymentServiceImpl;
import com.twohalf.mifty.service.ProductServiceImpl;
import com.twohalf.mifty.service.ReviewServiceImpl;
import com.twohalf.mifty.service.SettingServiceImpl;
import com.twohalf.mifty.service.SiteConfigServiceImpl;
import com.twohalf.mifty.service.SponsorServiceImpl;
import com.twohalf.mifty.service.UserServiceImpl;
import com.twohalf.mifty.service.gen.DemoService;
import com.twohalf.mifty.service.gen.FeedbackService;
import com.twohalf.mifty.service.gen.OrderService;
import com.twohalf.mifty.service.gen.PaymentService;
import com.twohalf.mifty.service.gen.ProductService;
import com.twohalf.mifty.service.gen.ReviewService;
import com.twohalf.mifty.service.gen.SettingService;
import com.twohalf.mifty.service.gen.SiteConfigService;
import com.twohalf.mifty.service.gen.SponsorService;
import com.twohalf.mifty.service.gen.UserService;


public class TwohalfServer {

	public static void main(String [] args) {
		
		MiftyServer ms = new MiftyServer();
		ms.setName("TwohalfServer");
		
		//register service interface
		ms.add("DemoService", new DemoService.Processor<DemoService.Iface>(new DemoServiceImpl()));  
		ms.add("com.twohalf.mifty.service.gen.UserService", 
				new UserService.Processor<UserService.Iface>(new UserServiceImpl()));
		ms.add("com.twohalf.mifty.service.gen.ProductService", 
				new ProductService.Processor<ProductService.Iface>(new ProductServiceImpl()));
		ms.add("com.twohalf.mifty.service.gen.OrderService", 
				new OrderService.Processor<OrderService.Iface>(new OrderServiceImpl()));
		ms.add("com.twohalf.mifty.service.gen.SponsorService", 
				new SponsorService.Processor<SponsorService.Iface>(new SponsorServiceImpl()));
		ms.add("com.twohalf.mifty.service.gen.ReviewService", 
				new ReviewService.Processor<ReviewService.Iface>(new ReviewServiceImpl()));
		ms.add("com.twohalf.mifty.service.gen.PaymentService", 
				new PaymentService.Processor<PaymentService.Iface>(new PaymentServiceImpl()));
		ms.add("com.twohalf.mifty.service.gen.SiteConfigService", 
				new SiteConfigService.Processor<SiteConfigService.Iface>(new SiteConfigServiceImpl()));
		ms.add("com.twohalf.mifty.service.gen.FeedbackService", 
				new FeedbackService.Processor<FeedbackService.Iface>(new FeedbackServiceImpl()));
		ms.add("com.twohalf.mifty.service.gen.SettingService", 
				new SettingService.Processor<SettingService.Iface>(new SettingServiceImpl()));

		//start
		ms.startup();
	}
}
